<?php
$mail_name=$_GET['mail_name'];
$mail_forward_name=$_GET['mail_forward_name'];

$output=array();

exec("cat /etc/postfix/relay_recipients |grep -v ".$mail_name,$output,$error);
$output[]=$mail_name." ".$mail_forward_name;
$fp=fopen("/etc/postfix/relay_recipients","w+");
foreach($output as $key=>$value){
	fwrite($fp,$value."\n");
}

fclose($fp);

echo "編集に成功しました.";
?>
